﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace MyFace
{
    class Ranking
    {
        Texture2D Rosto, Posicoes, ranking;
        Rectangle RecVoltar;


        Botao Voltar;

        public bool VoltarParaMenu = false;

        public void Initialize()
        {
            RecVoltar = new Rectangle(700, 500, 75, 70);
        }

        public void LoadContent(ContentManager Content)
        {
            Rosto = Content.Load<Texture2D>(@"Ranking/Rosto");
            Posicoes = Content.Load<Texture2D>(@"Ranking/Posicoes");
            ranking = Content.Load<Texture2D>(@"Ranking/Ranking");
            Voltar = new Botao("Voltar", RecVoltar,0);
            Voltar.Load(Content);
        }
        public void Update(GameTime gameTime)
        {
            Voltar.Update(gameTime, "Esquerda");

            if (Voltar.MouseOver&& Cursor.mstate.LeftButton == ButtonState.Pressed)
                VoltarParaMenu = true;
        }

        public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            
            Voltar.Draw(spriteBatch);
            spriteBatch.Draw(ranking, new Vector2(0, 20), Color.White);
            spriteBatch.Draw(Rosto, new Vector2(0, 95), Color.White);
            spriteBatch.Draw(Posicoes, new Vector2(300, 50), Color.White);
            
        }
    }
}
